@extends('Layout/personBase')


@section('title', '我的积分')

@section('css')
		<link href="{{asset('Home/css/point.css')}}" rel="stylesheet" type="text/css">
		
@endsection

@section('right')
	<!--标题 -->
	<div class="am-cf am-padding">
		<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">我的积分</strong> / <small>My&nbsp;Point</small></div>
	</div>
	<hr/>
	
	<div class="pointsTitle">

	   <div class="usable">可用积分<span>{{$sur}}</span></div>
	   <div class="pointshop"><a href="{{url('/Home/integralGoods')}}"><i><img src="../images/u5.png" /></i>积分商城</a></div>

	</div>
	
	<div class="pointlist am-tabs" data-am-tabs>
		<ul class="am-avg-sm-3 am-tabs-nav am-nav am-nav-tabs">
			<li class="am-active"><a href="#tab1">全部</a></li>
			<li><a href="#tab2">获得</a></li>
			<li><a href="#tab3">支出</a></li>
		</ul>
		<div class="am-tabs-bd">
			<div class="am-tab-panel am-fade am-in am-active" id="tab1">
				<table>
					<b></b>
					<thead>
					
						<tr>												
							<th class="th1">积分详情</th>
							<th class="th2">积分变动</th>
							<th class="th3">日期</th>
						</tr>

					</thead>										
					<tbody>
					@foreach ($inte as $v)
						<tr>
							<td class="pointType">{{$v->detail}}</td>
							<td class="pointNum">{{$v->change}}</td>
							<td class="pointTime">{{$v->date}}</td>
						</tr>
					@endforeach
					</tbody>
				</table>
			</div>
			<div class="am-tab-panel am-fade" id="tab2">
				<table>
					<b></b>
					<thead>
					
						<tr>												
							<th class="th1">积分详情</th>
							<th class="th2">获取积分</th>
							<th class="th3">日期</th>
						</tr>
					
					</thead>
					<tbody>
					@foreach ($inte as $v)
						@if(strpos($v->change, '+') !== false)
						<tr>
							<td class="pointType">{{$v->detail}}</td>
							<td class="pointNum">{{$v->change}}</td>
							<td class="pointTime">{{$v->date}}</td>
						</tr>
						@endif
					@endforeach
					</tbody>
				</table>
			</div>
			<div class="am-tab-panel am-fade" id="tab3">
				<table>
					<b></b>
					<thead>
						<tr>												
							<th class="th1">积分详情</th>
							<th class="th2">消耗积分</th>
							<th class="th3">日期</th>
						</tr>
					</thead>
					<tbody>
					@foreach ($inte as $v)
						@if(strpos($v->change, '-') !== false)
						<tr>
							<td class="pointType">{{$v->detail}}</td>
							<td class="pointNum">{{$v->change}}</td>
							<td class="pointTime">{{$v->date}}</td>
						</tr>
						@endif
					@endforeach
					</tbody>
				</table>
			</div>

		</div>

	</div>
@endsection